package personne;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.Table;

import com.sun.istack.internal.NotNull;

@Entity
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
public  abstract class Persistant implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = -1531947373562907691L;

/*	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "id")
	private int id = -1;*/
	
	@Id
	@Column(name = "code_per")
	private int code_per = -1;
	
	@Column(name = "nom")
	@NotNull
	private String nom = "nom";
	
	@Column(name = "prenom")
	@NotNull
	private String prenom = "prenom";
	
	

	
	public Persistant ()
	{}
	
	public Persistant(String nom , String Prenom )
	{
		this.nom = nom ;
		this.prenom = Prenom ;
		
	}

	public int getCode_per() {
		return code_per;
	}

	public void setCode_per(int code_per) {
		this.code_per = code_per;
	}

	public String getNom() {
		return nom;
	}

	public void setNom(String nom) {
		this.nom = nom;
	}

	public String getPrenom() {
		return prenom;
	}

	public void setPrenom(String prenom) {
		this.prenom = prenom;
	}


	
	
	
}
